/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License version 3 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

package br.ufrj.dcc.pushpeer.events;

/**
* This enum defines the event types of the PushPeer protocol.
* <p>
* The available identifiers for event type are:<br/>
* <ol>
* 	<li>REGISTER_IN_CB: Request from a peer to become the receiver's managed peer;</li>
* 	<li>REQUEST_CACHE: Request from a CB to cache a file;</li>
* 	<li>ASSERT_CACHE: Challenge from a CB to the managed peer, asking for proof of caching;</li>
* 	<li>NOTIFY_COMPLETE: Confirmation from the managed peer that it has finished caching the file;</li>
* 	<li>FETCH_REP: Request from a peer for the receiver's managed peer's reputation;</li>
* 	<li>PEER_REP: Reply from a CB with it's managed peer's reputation;</li>
* 	<li>REQUEST: Request from a peer for a file;</li>
* 	<li>CONFIRM: A confirmation from a peer that a request from the receiver's managed peer has been fulfilled. Should be followed with an ASSERT event to the sender;</li>
*	<li>PIECE: A previously requested piece of a file. It should be received shortly after a REQUEST event has been sent;</li>
*	<li>UPLOAD_FINISHED: Artificial event, used by a peer to notify itself that an upload was completed (to decrease the remainingUploadTime counter);</li>
* </ol>
*</p>
*/
public enum EventType {

	REGISTER_IN_CB, 
	REQUEST_CACHE,
	ASSERT_CACHE,
	NOTIFY_COMPLETE,
	FETCH_REP,
	PEER_REP,
	REQUEST,
	CONFIRM,
	PIECE,
	UPLOAD_FINISHED
	
}
